CREATE OR REPLACE
TRIGGER PIECE_NAMES_TRIGGER
BEFORE INSERT ON PIECE_NAMES
FOR EACH ROW WHEN (NEW.PIECE_NAME_ID IS NULL)
BEGIN
	SELECT PIECE_NAMES_SEQ.NEXTVAL
	INTO :NEW.PIECE_NAME_ID
	FROM DUAL;
END;